package org.example.boot.usercenter.common;


import lombok.Getter;

import static org.example.boot.usercenter.contant.UserContant.*;

public enum ErrorCode {
    SUCCESS(20000,ErrorCode_SUCCESSFUL,"成功操作"),
    PARAMS_ERROR(40000,ErrorCode_PARAMS_ERROR,"发请求的数据错误"),
    NULL_ERROR(40001,ErrorCode_NULL_ERROR,"请求参数为空"),
    NO_AUTH(40101,ErrorCode_NO_AUTH,"没有权限"),
    NO_LOGIN(40100,ErrorCode_NO_LOGIN,"没有登录"),
    SYSTEM_ERROR(50000,ErrorCode_SYSTEM_ERROR,"系统错误异常");
    @Getter
    private final int code;
    @Getter
    private final String message;
    @Getter
    private final String description;

    ErrorCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

}
